package com.bingguo.config;

import com.bingguo.constant.TokenConstants;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.context.annotation.Configuration;

@Data
@RefreshScope
@NoArgsConstructor
@Configuration
@EnableConfigurationProperties
@ConfigurationProperties(prefix = JwtProperties.PREFIX)
public class JwtProperties {
    public final static String PREFIX = "gateway.token";

    private String secret = TokenConstants.SECRET;
    /**
     * 失效时间 默认30分钟
     */
    private Long expire = TokenConstants.EXPIRE;
}
